<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h3>工作笔记</h3>
<a href="${pageContext.request.contextPath}/work/toAdd">添加笔记</a>
<table border="1">
    <thead>
    <tr>
        <td>笔记标题</td>
        <td>笔记分类</td>
        <td>编写时间</td>
        <td>操作</td>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="tmp" items="${list}">
        <tr>
            <td>${tmp.title}</td>
            <td>
                <c:if test="${tmp.type==1}">
                    技术
                </c:if>
                <c:if test="${tmp.type==2}">
                    行政
                </c:if>
                <c:if test="${tmp.type==3}">
                    人事
                </c:if>
            </td>
            <td>${tmp.createDate}</td>
            <td>
                <a href="${pageContext.request.contextPath}/work/view/${tmp.id}">详情</a>
                <a href="${pageContext.request.contextPath}/work/del/${tmp.id}">删除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>
